package 数据写入内存;


import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public class ByteArray {
    public static void main(String[] args) {
        ByteArrayOutputStream baos =new ByteArrayOutputStream();
        DataOutputStream dos =new DataOutputStream(baos);
        try {
            dos.writeInt(100);
            dos.writeDouble(3.14);
            dos.writeUTF("icss");
            baos.close();
            dos.close();
        }catch(IOException e){
            e.printStackTrace();
        }

    }
}
